<ion-view view-title="车辆检查-3.预览">
	<ion-nav-bar class="bar-positive">
		<ion-nav-back-button class="button-clear icon ion-ios-arrow-back" ng-click="backToList()">
			返回
		</ion-nav-back-button>
	</ion-nav-bar>	
	
	<ion-content class="has-header  has-footer">
		<div class="card result-text">
			<div class="row">
				<div class="col col-75">检查结果：</div>
				<div class="col" ng-class="result.resultTextCss">{{result.resultText}}</div>
			</div>
		</div>
	
		<div class="card card-text overdue">
			<div class="row">
				<div class="col col-33">仓库：</div>
				<div class="col">{{dataItem.warehouse.storename}}</div>
			</div>
			<div class="row">
				<div class="col col-33">运单号：</div>
				<div class="col">{{dataItem.sealno}}</div>
			</div>
			<div class="row">
				<div class="col col-33">运输公司：</div>
				<div class="col">{{dataItem.transporter.companyname}}</div>
			</div>
			<div class="row">
				<div class="col col-33">车牌号：</div>
				<div class="col">{{dataItem.carno}}</div>
			</div>
			<div class="row">
				<div class="col col-33">车型：</div>
				<div class="col">{{dataItem.carType.cartypename}}</div>
			</div>
			<div class="row">
				<div class="col col-33">日期：</div>
				<div class="col">{{dataItem.submitTime | date:'yyyy-MM-dd HH:mm'}}</div>
			</div>
		</div>
	
		<ul>
			<li class="samp overdue" ng-repeat="item in dataItem.checkItems" ng-if="!revise">
				<div class="row">
					<div class="white-color question-text col-8" ng-class="item.warn">{{item.questionno}}. </div>
					<div class="white-color question-text" ng-class="item.warn">{{item.checkitem}}</div>
				</div>
				<div class="row">
					<div class="col col-offset-8" ng-if="item.answer == 1">
						<label class="checkbox checkbox-stable" style="padding-left:0">
						<input type="radio" ng-model="item.answer" ng-value="1" name="answer{{$index}}">
						<p class="white-color radio-text">是</p>
						</label>					
					</div>
					<div class="col" ng-if="item.answer == 2">
						<label class="checkbox checkbox-stable">
							<input type="radio" ng-model="item.answer" ng-value="2" name="answer{{$index}}">
							<p class="white-color radio-text">否</p>
						</label>
					</div>
				</div>

                <div ng-if="item.answer==2">
                    <span style="display: block;height: 1px;background-color: white;"></span>
                    <div class="photo-div" >
                        <div class="img-div" ng-repeat="img in item.photos track by $index">
                            <img ng-src="{{img}}" width="100%" height="100%"/>
                        </div>
                    </div>
                    <div class="item-input note-div">
                        <span class="white-color">备注：</span>
                    </div>
                </div>

			</li>

			<li class="samp" ng-repeat="item in noOptions" ng-if="revise">
				<div class="row">
					<div class="positive question-text col-8" ng-class="item.warn">{{item.questionno}}.</div>
					<div class="positive question-text" ng-class="item.warn">{{item.checkitem}}</div>
				</div>
				<div class="row">
					<div class="col col-offset-8">
						<label class="checkbox checkbox-balanced" style="padding-left:0">
						<input type="radio" ng-model="item.answer" ng-value="1" name="answer{{$index}}">
						<p class="positive radio-text">是</p>
						</label>					
					</div>
					<div class="col">
						<label class="checkbox checkbox-balanced">
							<input type="radio" ng-model="item.answer" ng-value="2" name="answer{{$index}}">
							<p class="positive radio-text">否</p>
						</label>
					</div>
				</div>


                <div ng-if="item.answer==2">
                    <span class="horizon"></span>
                    <div class="photo-div" >
                        <div class="img-div" ng-repeat="img in item.photos track by $index">
                            <img ng-src="{{img}}" width="100%" height="100%"/>
                        </div>
                        <button ng-if="item.photos.length < 2" ng-click="takePhoto($index)" class="button icon photo-btn ion-ios-camera-outline "></button>
                    </div>
                    <div class="item-input note-div">
                        <span>备注：</span>
                        <input type="text" placeholder="点击输入">
                    </div>
                </div>


			</li>			
		</ul>
	
	</ion-content>
	<div class="bar bar-footer bar-stable">
		<button class="button button-full next-btn button-positive" ng-if="!revise" ng-click="submitCheckItem()">提交</button>
		<button class="button button-full next-btn button-positive" ng-if="revise" ng-click="changeFinish()">整改完成</button>
	</div>
</ion-view>
